using System;
using System.Collections.Generic;
namespace InSafetyAirServer.Model
{
	/// <summary>
	/// Basic graph operations on an unweighted graph are
    /// defined in this interface.
	/// Specification omitted when obvious
	/// </summary>
	public interface IGraph<T, E>
	{
		///<summary>
		///adds a vertex to the graph
		///</summary>
		void AddVertex(Vertex<T, E> vertex);

		///<summary>
		///adds an edge to the (unweighted) graph
		///PRE (to,from) is not contained in the graph
		///</summary>
        void AddEdge(Vertex<T, E> startVertex, Vertex<T, E> endVertex, E data);
        void RemoveEdge(Vertex<T, E> startVertex, Vertex<T, E> endVertex, E data);

		///<summary>
		///determines whether a vertex is in the graph
		///</summary>
        bool ContainsVertex(Vertex<T, E> vertex);

		///<summary>
		///determines whether two vertices are adjacent
		///</summary>
        bool IsAdjacent(Vertex<T, E> startVertex, Vertex<T, E> endVertex);
	
		///<summary>
		///Returns a list containing all vertices adjancent to vertex.
		///Must be a list since it should be possible to remove adjacent vertices
		///</summary>
        IList<Vertex<T, E>> GetAdjacencies(Vertex<T, E> vertex);

		///<summary>
		///Returns an Enumerator to the collection of vertices
		///</summary>
        IEnumerator<Vertex<T, E>> Vertices();

		///<summary>
		///determines whether the graph is empty
		///</summary>
		bool IsEmpty();

		///<summary>
		///returns the number of vertices
		///</summary>
		int GetNoOfVertices();

		///<summary>
		///returns the number of edges
		///</summary>
		int GetNoOfEdges();
		
		///<summary>
		///makes the graph empty
		///</summary>
		void Clear();

        void BFS(Vertex<T, E> v);
        void DFS(Vertex<T, E> v);
        Edge<T, E> getEdge(Vertex<T, E> startVertex, Vertex<T, E> endVertex);
        IList<Edge<T, E>> Edges();
        Vertex<T, E> getVertex(T obj);
        int IndexOf(Vertex<T, E> v);
        void Unmark();
		
	}
}
